home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-09 | 5.4 KB | 120 lines | [TEXT/KAHL] |
- /*
- Octahedron.r
-
- Commented Rez Compiler source for making a Spin It!
- document that contains a "Hyper-Octahedron".
-
- by James Jennings
- */
-
- #include "polytope.r"
-
- /* 'Dim0' contains a list of the vertices. */
-
- resource 'Dim0' (256, "{3,3,4} Vertices") {
- /* First, there is the radius of the object. This controls
- how the object will fill the window. Make this the biggest distance
- that any of your vertices is from the origin. I've made it pretty large
- because it's better for Spin It! to shrink an object to the window than
- to grow it. It's a 16 bit number, so keep it under 32000. */
- 2000, /* the object's radius */
- { /* array vertArray: 8 elements */
- /* Each element is one corner of the figure. */
- /* { x, y, z, t }, */
- /* [0] */ { 2000, 0, 0, 0 },
- /* [1] */ {-2000, 0, 0, 0 },
- /* [2] */ { 0, 2000, 0, 0 },
- /* [3] */ { 0,-2000, 0, 0 },
- /* [4] */ { 0, 0, 2000, 0 },
- /* [5] */ { 0, 0,-2000, 0 },
- /* [6] */ { 0, 0, 0, 2000 },
- /* [7] */ { 0, 0, 0,-2000 }
- }
- };
-
- /* 'Dim1' contains a list of the edges */
- resource 'Dim1' (256, "{3,3,4} Edges") {
- { /* array edgeArray: 24 elements */
- /* Each edge gives the indices of two vertices. Note
- that the vertices are counted from zero. */
- /* [0] */ { 0, 2 }, /* an edge connecting vertex 0 with vertex 2 */
- /* [1] */ { 0, 3 },
- /* [2] */ { 0, 4 },
- /* [3] */ { 0, 5 },
- /* [4] */ { 0, 6 },
- /* [5] */ { 0, 7 },
- /* [6] */ { 1, 2 },
- /* [7] */ { 1, 3 },
- /* [8] */ { 1, 4 },
- /* [9] */ { 1, 5 },
- /* [10] */ { 1, 6 }, /* an edge connecting vertex 1 with vertex 6 */
- /* [11] */ { 1, 7 },
- /* [12] */ { 2, 4 },
- /* [13] */ { 2, 5 },
- /* [14] */ { 2, 6 },
- /* [15] */ { 2, 7 },
- /* [16] */ { 3, 4 },
- /* [17] */ { 3, 5 },
- /* [18] */ { 3, 6 },
- /* [19] */ { 3, 7 },
- /* [20] */ { 4, 6 },
- /* [21] */ { 4, 7 },
- /* [22] */ { 5, 6 },
- /* [23] */ { 5, 7 }
- }
- };
-
- /* The text that appears in the Get Info... window. */
- /* (No, I didn't write this by hand. It's from a Rez decompiler.) */
- data 'TEXT' (256) {
- $"4879 7065 7220 4F63 7461 6865 6472 6F6E" /* Hyper Octahedron */
- $"0D0D 416C 736F 206B 6E6F 776E 2061 7320" /* ¬¬Also known as */
- $"6120 D231 362D 6365 6C6C D32E 0D0D 5468" /* a “16-cell”.¬¬Th */
- $"6973 2069 7320 6120 6765 6E65 7261 6C69" /* is is a generali */
- $"7A65 6420 6F63 7461 6865 6472 6F6E 2E20" /* zed octahedron. */
- $"596F 7520 6361 6E20 7374 6172 7420 7769" /* You can start wi */
- $"7468 2061 6E20 6F63 7461 6865 6472 6F6E" /* th an octahedron */
- $"2074 6861 7420 6861 7320 636F 726E 6572" /* that has corner */
- $"7320 6F6E 2074 6865 20B1 7820 6178 6973" /* s on the ±x axis */
- $"2C20 7468 6520 B179 2061 7869 732C 2061" /* , the ±y axis, a */
- $"6E64 2074 6865 20B1 7A20 6178 6973 2028" /* nd the ±z axis ( */
- $"7369 7820 636F 726E 6572 7329 2061 6E64" /* six corners) and */
- $"2061 6464 2074 776F 206D 6F72 6520 706F" /* add two more po */
- $"696E 7473 206F 6E20 7468 6520 B174 2061" /* ints on the ±t a */
- $"7869 732E 0D0D 4974 2068 6173 3A0D 3820" /* xis.¬¬It has:¬8 */
- $"7665 7274 6963 6573 0D32 3420 6564 6765" /* vertices¬24 edge */
- $"730D 3332 2066 6163 6573 2028 7472 6961" /* s¬32 faces (tria */
- $"6E67 6C65 7329 0D31 3620 6365 6C6C 7320" /* ngles)¬16 cells */
- $"2874 6574 7261 6865 6472 6129 0D0D 5363" /* (tetrahedra)¬¬Sc */
- $"686C 8A66 6C69 2053 796D 626F 6C3A 207B" /* hläfli Symbol: { */
- $"332C 332C 347D 0D0D 4974 7320 6475 616C" /* 3,3,4}¬¬Its dual */
- $"2069 7320 7468 6520 7B34 2C33 2C33 7D20" /* is the {4,3,3} */
- $"2822 5465 7373 6572 6163 7422 2C20 206F" /* ("Tesseract", o */
- $"7220 2248 7970 6572 6375 6265 2229 0D0D" /* r "Hypercube")¬¬ */
- $"4974 D573 206F 6E65 206F 6620 7468 6520" /* It’s one of the */
- $"7369 7820 506C 6174 6F6E 6963 2048 7970" /* six Platonic Hyp */
- $"6572 736F 6C69 6473 2E" /* ersolids. */
- };
-
- /* "Style" information for the above text. */
- data 'styl' (256) {
- $"000D 0000 0000 0010 000C 0001 0100 0000" /* .¬.............. */
- $"0000 0000 0000 0000 0011 0008 0006 0001" /* ................ */
- $"0000 0006 0000 0000 0000 0000 0012 000D" /* ...............¬ */
- $"000A 0001 0000 000A 0000 0000 0000 0000" /* ................ */
- $"002C 0008 0006 0001 0000 0006 0000 0000" /* .,.............. */
- $"0000 0000 002E 000D 000A 0001 0000 000A" /* .......¬........ */
- $"0000 0000 0000 0000 00E5 0008 0006 0001" /* ................ */
- $"0000 0006 0000 0000 0000 0000 00E6 000D" /* ...............¬ */
- $"000A 0001 0000 000A 0000 0000 0000 0000" /* ................ */
- $"012D 0008 0006 0001 0000 0006 0000 0000" /* .-.............. */
- $"0000 0000 012E 000D 000A 0001 0000 000A" /* .......¬........ */
- $"0000 0000 0000 0000 0147 0008 0006 0001" /* .........G...... */
- $"0000 0006 0000 0000 0000 0000 0148 000D" /* .............H.¬ */
- $"000A 0001 0000 000A 0000 0000 0000 0000" /* ................ */
- $"017F 0008 0006 0001 0000 0006 0000 0000" /* ................ */
- $"0000 0000 0180 000D 000A 0001 0000 000A" /* .....Ä.¬........ */
- $"0000 0000 0000" /* ...... */
- };
-
-